<%-- 
    Document   : searchResult
    Created on : Dec 22, 2011, 11:43:37 AM
    Author     : Hatta
--%>

<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:import url="header.jsp" />

<h1>${lexicon.searchResults}</h1>

      <c:choose>
    <c:when test="${empty listings}">
        <div class="noSearchResults">
            <p>${lexicon.noResults}</p>
        </div>
    </c:when>
    <c:otherwise>
        <ul class="searchResults">
        <c:forEach var="listing" items="${listings}">
            <li>
                <strong><a href="displayListing?daftarId=${listing.daftarId}">${listing.obat.merk}</a></strong>
                    ${lexicon.by}
                    <c:forTokens var="merk" items="${listing.obat.merk}" delims="|" varStatus="status">
                        <a href="obatSearch?merk=${merk}">${merk}</a><c:if test="${not status.last}">, </c:if>
                    </c:forTokens><br />
                    ${lexicon.kode}: ${listing.obat.kode}<br />
                    ${lexicon.listedBy} <a href="displayUser?userId=${listing.userId}">${listing.user.email}</a> ${lexicon.on} ${listing.listDate}<br />
                    <c:if test="${not listing.active}">
                        <em>${lexicon.listingInactive}</em>
                    </c:if>
            </li>
        </c:forEach>
        </ul>
    </c:otherwise>
</c:choose>
<c:import url="footer.jsp" />
